home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1120 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  3.1 KB

  1. Date: Thu, 3 Mar 94 15:09:47 PST
  2. From: hyc@hanauma.jpl.nasa.gov (Howard Chu)
  3. Message-Id: <9403032309.AA20975@hanauma.jpl.nasa.gov>
  4. To: herborth@53iss6.waterloo.ncr.com, mint@atari.archive.umich.edu
  5. Subject: Re:  Three things
  6.  
  7. I've been tracking just about all the patches and RCSing them into my source
  8. tree. Right now I only have Julian's tosfs stuff and Steve's load-average
  9. stuff left to merge in. (And perhaps to back out entropy's last job control
  10. change?)
  11.  
  12. [re: cross-compiler, sym-ld - you always need to use sym-ld if you plan to
  13. debug with gdb. Not just for little-endian systems...]
  14.  
  15. I am unfortunately too busy trying to get other code to work at this moment to
  16. build a new gcc setup. I'm still running 2.3.3...
  17.  
  18. btw, since I don't know of a program that directly takes diffs into an RCS
  19. control file, here are two csh scripts I've been using for a while to manage
  20. patches... The first, "patchit" runs patch and then checks the affected files
  21. into RCS. The second, "checkin" just looks for patched files and checks them
  22. in. I patched my copy of patch to name files ".O" and ".R" instead of ".orig"
  23. and ".rej" on the ST, since they have a better chance of staying intact on a
  24. short-name filesystem. [You've got to be using MinixFS to keep case preserved,
  25. eh?] The scripts work fine with tcsh on the ST, [originally used on a Sun...]
  26. though I source them in that case, dunno about actually trying to execute them.
  27.  
  28. Too bad neither of these scripts checks for changed files in subdirectories.
  29.  
  30. #!/bin/csh -f
  31. # Patchit - apply patches and check into RCS. -- hyc, 3-1-93
  32. if ($#argv < 1) then
  33.     echo "usage: $argv[0] patchfile [patch-options]"
  34.     exit 1
  35. endif
  36.  
  37. set nonomatch
  38. if (-e *.orig) then
  39.     echo "You still have to check in some old files\!"
  40.     echo *.orig
  41.     exit 1
  42. endif
  43.  
  44. if (! -e RCS) then
  45.     echo "Creating RCS directory in $cwd"
  46.     mkdir RCS
  47. endif
  48.  
  49. if (! -e Text) then
  50.     echo "Enter one line message for RCS initial description:"
  51.     set i=$<
  52.     echo $i > Text
  53. endif
  54.  
  55. echo -n "Enter one-line patch identifier: "
  56. set msg=$<
  57.  
  58. if ($#argv == 1) then
  59.     patch < $argv[1]
  60. else
  61.     patch $argv[2-] < $argv[1]
  62. endif
  63.  
  64. foreach i (*.orig)
  65.     set j=$i:r
  66.  
  67.     if (! -e RCS/$j,v) then
  68.         mv $j $j.new
  69.         mv $i $j
  70.         ci -tText $j
  71.         rcs -l $j
  72.         mv $j.new $j
  73.     endif
  74.  
  75.     ci -l -m"$msg" $j
  76.     if (-e $i) rm $i
  77. end
  78.  
  79. if (-e *.rej) then
  80.     unset nonomatch
  81.     echo "Got some problems, check these out:"
  82.     ls -l *.rej
  83.     exit 1
  84. endif
  85. exit 0
  86.  
  87. #!/bin/csh -f
  88. # checkin - check patched files into RCS. -- hyc, 9-12-93
  89.  
  90. if (! -e RCS) then
  91.     echo "Creating RCS directory in $cwd"
  92.     mkdir RCS
  93. endif
  94.  
  95. if (! -e Text) then
  96.     echo "Enter one line message for RCS initial description:"
  97.     set i=$<
  98.     echo $i > Text
  99. endif
  100.  
  101. echo -n "Enter one-line patch description: "
  102. set msg=$<
  103. foreach i (*.orig)
  104.     set j=$i:r
  105.  
  106.     if (! -e RCS/$j,v) then
  107.         mv $j $j.new
  108.         mv $i $j
  109.         ci -tText $j
  110.         rcs -l $j
  111.         mv $j.new $j
  112.     endif
  113.  
  114.     ci -l -m"$msg" $j
  115.     if (-e $i) rm $i
  116. end
  117.  
  118.  
  119. ####
  120.  
  121. I suppose you might want to be more verbose than just the single-line messages
  122. I used. I just run it and say, for initial description, e.g., "mint source"
  123. and e.g. "Optimizations from Andreas Schwab" and in it goes... (Mebbe it would
  124. be a good idea to also assign symbolic names to a set of patched files?)
  125. Enjoy...
  126.